import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.net.URL;

/**
 * Created by Administrator on 2017/11/6.
 */
public class Test {
    public static void main(String[] args) throws ClassNotFoundException {
        String name="net.zjitc.utils.ex02";
        String pagePath = name.replace(".", "/");
        URL resource = Thread.currentThread().getContextClassLoader().getResource(pagePath);
        File file = new File(resource.getPath());

        File[] files = file.listFiles();
        for (File f:
            files ) {

          String  pageName = f.getName().substring(0, f.getName().length() - 6);
            pagePath=pagePath+"."+pageName;
        System.out.println(pagePath);
            Class clazz=Class.forName("net.zjitc.utils.ex02.Admin");
            Method[] methods = clazz.getMethods();
            for (Method m:
                 methods) {
                System.out.println(m);
            }
        }

    }
}
